home *** CD-ROM | disk | FTP | other *** search
- property startsprite, endSprite, scriptname, whichevent
-
- on getPropertyDescriptionList
- set p_list to [#startsprite: [#comment: "Sprite to remove from:", #format: #integer, #default: 1], #endSprite: [#comment: "Sprite to remove from:", #format: #integer, #default: 1], #scriptname: [#comment: "Script to remove:", #format: #string, #default: "script name"], #whichevent: [#comment: "Activation event:", #format: #symbol, #default: #endSprite, #range: [#mouseUp, #mouseDown, #beginSprite, #endSprite, #mouseUpOutSide, #mouseEnter]]]
- return p_list
- end
-
- on new me
- return me
- end
-
- on beginSprite me
- if whichevent = #beginSprite then
- run(me)
- end if
- end
-
- on endSprite me
- if whichevent = #endSprite then
- run(me)
- end if
- end
-
- on mouseDown me
- if whichevent = #mouseDown then
- run(me)
- end if
- end
-
- on mouseUp me
- if whichevent = #mouseUp then
- run(me)
- end if
- end
-
- on mouseUpOutSide me
- if whichevent = #mouseUpOutSide then
- run(me)
- end if
- end
-
- on mouseEnter me
- if whichevent = #mouseEnter then
- run(me)
- end if
- end
-
- on run me
- repeat with n = startsprite to endSprite
- if the scriptInstanceList of sprite n <> [] then
- repeat with i = count(the scriptInstanceList of sprite n) down to 1
- if string(getAt(the scriptInstanceList of sprite n, i)) contains scriptname then
- deleteAt(the scriptInstanceList of sprite n, i)
- end if
- end repeat
- end if
- end repeat
- end
-